package com.hengpeng.itfinoss.service.fund;

import java.util.LinkedHashMap;
import java.util.List;

import com.hengpeng.common.exception.ServiceResult;
import com.hengpeng.common.persist.query.model.Order.OrderType;
import com.hengpeng.itfinbase.persist.Account;

public interface AccountService
{
	/**
	 * <pre>
	 * 分页查询资金明细
	 * </pre>
	 * @param userName
	 * @param trustAccountId
	 * @param pageIndex
	 * @param pageSize
	 * @param sortMap
	 * @return
	 */
	public ServiceResult<List<Account>> findWithPage(String userName, String trustAccountId, Integer pageIndex,
			Integer pageSize, LinkedHashMap<String, OrderType> sortMap);

	/**
	 * 个体账户查询
	 * @param userName
	 * @return
	 */
	public Account getByUserName(String userName);

	/**
	 * 平台子账户查询
	 * @param userId
	 * @param subAccountType
	 * @return
	 */
	public Account getByUserId(Long userId, String subAccountId);

	/**
	 * <pre>
	 * 根据用户id获取账户
	 * </pre>
	 * @param userId
	 * @return
	 */
	public List<Account> findByUserId(Long userId);

	public ServiceResult<Long> queryCount(String userName, String trustAccountId);

}
